<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>列表试图组件</title>
<link href="../../css/bootstrap3.css" rel="stylesheet" media="screen">
<link href="../../css/font-awesome.css" rel="stylesheet"> 
<link href="../../css/koala.css" rel="stylesheet" media="screen">
<script src="../../js/jquery.js" type="text/javascript"></script>
<script src="../../lib/Koala_ListView.js" type="text/javascript"></script>
<script src="icon/data.js" type="text/javascript"></script>
<script type="text/javascript">

var newDatas = [{
	"id":"win2","icon":"icon/icon6.png","title":"通讯薄2"
}]

$(function(){
	$("#lv1").listview({
		datas:datas
	});
	
	
	$("#btn_reset").click(function(){
		$("#lv1").data("koala.listview").clear();
	});
	
	$("#btn_update").click(function(){
		$("#lv1").data("koala.listview").update(newDatas[0]);
	});
	
	$("#btn_add").click(function(){
		$("#lv1").data("koala.listview").addView(newDatas);
	});
	
	$("#btn_remove").click(function(){
		$("#lv1").data("koala.listview").remove("win3");
	});

});

</script>
</head>
<body>
<div class="container">
	<div id="lv1" class="row"></div>
	<div class="row">
		<button id="btn_add" class="btn btn-info">增加</button>
		<button id="btn_reset" class="btn btn-success">清除</button>
		<button id="btn_update" class="btn btn-warning">更新</button>
		<button id="btn_remove" class="btn btn-danger">除掉</button>
	</div>
</div>
</body>
</html>